﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using GameBase;

namespace MilitaryPluginInterface
{
    public class Hero : Military
    {
        public Hero(string imgStr, Vector2 pos)
            : base(imgStr, pos)
        {
            
        }

        public override void init(string imgStr, Vector2 pos)
        {
            base.init(imgStr, pos);

            _health.MaxHealth = 200;
            _health.Health = 200;
            _rangeAttack = 400;
            _strengthAttack = 30;
            _defend = 20;
            _targetPosition = pos;
            _speed = 3;
            _delay = 200;
            _produceTime = 30;
            _scale = 1;

            _idle = new LoopSprite(imgStr + @"_idle", 6, pos, _scale, _delay);
            _walk = new LoopSprite(imgStr + @"_walk", 6, pos, _scale, _delay);
            _attack = new LoopSprite(imgStr + @"_attack", 8, pos, _scale, _delay);
            _die = new OneTimeSprite(imgStr + @"_die", 19, pos, _scale, _delay);
            Bullet = new LoopSprite(@"Resources/bullet_soldier", 18, pos, _scale, 70);
            _health.Width = (int)(_idle.LstTexture[0].Width * _idle.Scale);
            _health.Position = pos;

            idle();
        }

        public override Object clone()
        {
            return new Hero(_imgStr, Position);
        }

        public override string getName()
        {
            return @"hero";
        }
    }
}
